package com.qd.common.panda.domain.entity.order;

import com.cdqidi.dict.annotation.FieldBind;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单列表显示信息
 *
 * @author sjk
 * @create 2022-10-12 15:40
 * @since 1.0.0
 */
@Data
@ToString
public class MallOrderDTO{

    /**
     * 订单ID
     */
    private String orderId;
    /**
     * 开始时间
     */
    private LocalDateTime startTime;
    /**
     * 订单金额
     */
    private BigDecimal orderAmount;
    /**
     * 订单金额显示
     */
    private String orderAmountDisplay;
    /**
     * 实际支付金额
     */
    private BigDecimal payAmount;
    /**
     * 实际支付金额显示
     */
    private String payAmountDisplay;
    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;
    /**
     * 优惠金额显示
     */
    private String discountAmountDisplay;
    /**
     * 支付状态
     */
    private Integer payStatus;
    /**
     * 支付状态显示
     */
    private String payStatusDisplay;
    /**
     * 订单类型
     */
    private Integer orderType;
    /**
     * 订单类型显示
     */
    private String orderTypeDisplay;
    /**
     * 用户唯一标识
     */
    private String userId;
    /**
     * 用户手机号
     */
    private String mobile;
    /**
     * 商品ID
     */
    private String commodityId;
    /**
     * 商品编码
     */
    private String commodityCode;
    /**
     * 商品名称
     */
    private String commodityName;
    /**
     * 购买数量
     */
    private Long quantity;
    /**
     * 商品价格
     */
    private BigDecimal commodityPrice;
    /**
     * 商品价格显示
     */
    private String commodityPriceDisplay;
    /**
     * 结算价格
     */
    private BigDecimal discountPrice;
    /**
     * 结算价格显示
     */
    private String discountPriceDisplay;
    /**
     * 产品形式
     */
    @FieldBind(targetField = "productFormDisplay")
    private String productForm;
    /**
     * 产品形式显示
     */
    private String productFormDisplay;
    /**
     * 是否重试
     */
    @FieldBind(targetField = "retryDisplay")
    private String retry;
    /**
     * 是否重试显示
     */
    private String retryDisplay;
    /**
     * 订单状态
     */
    private Integer orderState;
    /**
     * 订单状态显示
     */
    private String orderStateDisplay;

    public void freeData() {
        this.orderId = null;
        this.startTime = null;
        this.orderAmount = null;
        this.orderAmountDisplay = null;
        this.payAmount = null;
        this.payAmountDisplay = null;
        this.discountAmount = null;
        this.discountAmountDisplay = null;
        this.payStatus = null;
        this.payStatusDisplay = null;
        this.orderType = null;
        this.orderTypeDisplay = null;
        this.userId = null;
        this.mobile = null;
        this.commodityId = null;
        this.commodityCode = null;
        this.commodityName = null;
        this.quantity = null;
        this.commodityPrice = null;
        this.commodityPriceDisplay = null;
        this.discountPrice = null;
        this.discountPriceDisplay = null;
        this.productForm = null;
        this.productFormDisplay = null;
        this.retry = null;
        this.retryDisplay = null;
        this.orderState = null;
        this.orderStateDisplay = null;
    }
}